<template>
  <div class="manage_page fillcontain">
    <el-row style="height: 100%;">
      <el-col :span="4" style="min-height: 100%; background-color: #222d32;">
        <el-menu :default-active="defaultActive" class="my-menu" background-color="#222d32" text-color="#909eae" active-text-color="#9cdbff" router unique-opened>
          <el-menu-item index="home"><i class="el-icon-menu"></i>E学堂</el-menu-item>
          <el-submenu index="1">
            <template slot="title"><i class="el-icon-setting"></i>系统管理</template>
            <el-menu-item index="discussionManage"><span>讨论区管理</span></el-menu-item>
            <el-menu-item index="userList"><span>用户管理</span></el-menu-item>
            <el-menu-item index="groupList"><span>班级管理</span></el-menu-item>
            <el-menu-item index="loginRecord"><span>刷卡记录</span></el-menu-item>
          </el-submenu>
          <el-submenu index="2">
            <template slot="title"><i class="el-icon-upload"></i>智慧仓储</template>
            <el-menu-item index="deviceType">设备类型</el-menu-item>
            <el-menu-item index="deviceName">设备名称</el-menu-item>
            <el-menu-item index="deviceStock">设备库存</el-menu-item>
            <el-menu-item index="consumableList">耗材管理</el-menu-item>
            <!--<el-menu-item index="deviceList">设备列表</el-menu-item>-->  <!-- TODO：等待仓储接口-->
            <!--<el-menu-item index="deviceAllot">配置下发</el-menu-item>-->
          </el-submenu>
          <!--<el-submenu index="3">-->
            <!--<template slot="title"><i class="el-icon-plus"></i>仿真配置</template>-->
            <!--<el-menu-item index="simulationList">仿真列表</el-menu-item>-->
            <!--<el-menu-item index="simulationList">添加仿真</el-menu-item>-->
          <!--</el-submenu>-->
          <el-submenu index="4">
            <template slot="title"><i class="el-icon-document"></i>实训管理</template>
            <el-menu-item index="taskList">任务列表</el-menu-item>
            <el-menu-item index="createTask">新增任务</el-menu-item>
            <el-menu-item index="taskAllotList">下发列表</el-menu-item>
            <!--<el-menu-item index="reportList">仿真截图</el-menu-item>-->
            <el-menu-item index="reportList">实验报告</el-menu-item>
            <el-menu-item index="stepMonitor">进度监控</el-menu-item>
          </el-submenu>
          <!--<el-submenu index="5">-->
            <!--<template slot="title"><i class="el-icon-message"></i>考试管理</template>-->
            <!--<el-menu-item index="examList">试卷列表</el-menu-item>-->
            <!--<el-menu-item index="examAllotList">试卷发布</el-menu-item>-->
          <!--</el-submenu>-->
          <el-submenu index="6">
            <template slot="title"><i class="el-icon-star-on"></i>工位管理</template>
            <el-menu-item index="workstationList">工位列表</el-menu-item>
            <el-menu-item index="terminalList">监控终端列表</el-menu-item>
            <el-menu-item index="pcList">PC列表</el-menu-item>
          </el-submenu>
        </el-menu>
      </el-col>
      <el-col :span="20" style="height: 100%;overflow: auto;">
        <keep-alive>
          <router-view></router-view>
        </keep-alive>
      </el-col>
    </el-row>
  </div>
</template>

<script>
  export default {
    computed: {
      defaultActive: function () {
        if (this.$route.path.indexOf('/examShow') > 0) {
          return 'examList'
        }
        return this.$route.path.replace('/manage/', '')
      }
    }
  }
</script>

<style lang="less">
  .my-menu {
    list-style: none;
    position: relative;
    margin: 0;
    padding-left: 0;
    min-height: 100%;
    border-right: none;
  }
  .table_container {
    padding: 24px;
  }
  .fillcontain{
    height: 100%;
    width: 100%;
    min-width: 0;
  }
</style>

